package com.yjzx.util.service.pay.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author yjzx
 * @Description
 * @create 2022-12-28 23:20
 */
@Data
@Component
@ConfigurationProperties(prefix = "app.pay.wechat")
public class WechatProperties {
    public static class WxApplication{
        /**
         * APP的appid
         */
        private String appId;
        /**
         * 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
         */
        private String notifyUrl;
        /**
         * 小程序所对应的secretKey
         */
        private String secretKey;
        /**
         * 小程序code换OpenIdUrl
         */
        private String openIdUrl;

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getNotifyUrl() {
            return notifyUrl;
        }

        public void setNotifyUrl(String notifyUrl) {
            this.notifyUrl = notifyUrl;
        }

        public String getSecretKey() {
            return secretKey;
        }

        public void setSecretKey(String secretKey) {
            this.secretKey = secretKey;
        }

        public String getOpenIdUrl() {
            return openIdUrl;
        }

        public void setOpenIdUrl(String openIdUrl) {
            this.openIdUrl = openIdUrl;
        }
    }
    /**
     * 微信支付商户号
     */
    private String mchId;
    /**
     * 微信支付商户密钥
     */
    private String mchKey;
    /**
     * aliclient_cert.p12文件的绝对路径，或者如果放在项目中，请以classpath:开头指定
     */
    private String keyPath;
    private WxApplication app;
    private WxApplication mini;
    private WxApplication html;

}
